<form method="post" class="form-x one-form form-auto" id="form" action="{:U('/Rbac/sortNode')}">
<div class="panel one-box">
	<div class="table-responsive">
		<table id="table" class="table table-hover ">
			<tbody>
				<tr>
					<th width="100">编号</th>
					<th width="100">名称</th>
					<th width="150">描述</th>
					<th width="100">开启状态</th>
					<th width="100">排序</th>
					<th width="200">添加子节点</th>
					<th width="200">操作</th>
				</tr>
				
				<foreach name='node' item='v'>
				<tr>
					<td>{$v.id}</td>
					<td>{$v.name}</td>
					<td>{$v.html}{$v.title}</td>
					<td>
						<if condition='$v["status"]'>开启<else/>关闭</if>
					</td>
					<td>
						<input type="text" class="input" name="{$v.id}" value="{$v.sort}" size="50">
					</td>
					<td>
						<?php if($v['level']==1):?>
						<a href="{:U('Admin/Rbac/addNode',array('pid'=>$v['id'],'level'=>2))}">添加控制器</a>
						<?php endif; ?>
						<?php if($v['level']==2):?>
						<a href="{:U('Admin/Rbac/addNode',array('pid'=>$v['id'],'level'=>3))}">&nbsp;添加方法</a>
						<?php endif; ?>
					</td>
					<td>
						<a class="button bg-blue button-small icon-pencil" title="修改" alt="修改" href="editNode/id/{$v['id']}"></a>
						<a class="button bg-red button-small icon-trash-o js-del" title="删除" alt="删除" href="deleteNode/id/{$v['id']}"></a>
					</td>	
				</tr>
				</foreach>
				
			</tbody>
		</table>
	</div>
	<div class="panel-foot">
		<div class="form-button">
			<button class="button border-main" type="submit">排序</button>
		</div>
	</div>
</div>
</form>


<!--
<a href="{:U('Admin/Rbac/addNode')}"><strong>添加应用</strong></a>
<foreach name='node' item='app'>
	<dd>
		<strong>{$app.title}</strong>
		[<a href="{:U('Admin/Rbac/addNode',array('pid'=>$app['id'],'level'=>2))}">添加控制器</a>]
		[<a href="editNode/id/{$app['id']}">修改</a>]
		[<a href="deleteNode/id/{$app['id']}">删除</a>]
	</dd>
	<foreach name='app.child' item='action'>
		<dd>
			<strong>&nbsp;&nbsp;{$action.title}</strong>
			[<a href="{:U('Admin/Rbac/addNode',array('pid'=>$action['id'],'level'=>3))}">添加方法</a>]
			[<a href="editNode/id/{$action['id']}">修改</a>]
			[<a href="deleteNode/id/{$action['id']}">删除</a>]
		</dd>
		<foreach name='action.child' item='method'>
			<dd>
				<span>&nbsp;&nbsp;&nbsp;&nbsp;{$method.title}</span>
				[<a href="editNode/id/{$method['id']}">修改</a>]
				[<a href="deleteNode/id/{$method['id']}">删除</a>]
			</dd>
		</foreach>
	</foreach>
</foreach>
-->